package com.py.korona.providers;

import android.content.UriMatcher;
import android.net.Uri;
import com.py.korona.db.model.CategoriesInRoomEntity;
import com.py.korona.db.model.RoomEntity;
import com.py.korona.providers.base.SimpleDBContentProvider;

public class RoomsWithinCategoryContentProvider extends SimpleDBContentProvider {
    @Override
    protected String getSQLTableName(UriMatcher uriMatcher, Uri uri) {
        return String.format("%s join %s on %s=%s", RoomEntity.TableName, CategoriesInRoomEntity.TableName, RoomEntity.TableFieldAliasID(), CategoriesInRoomEntity.TableFieldAliasRoom());
    }

    @Override
    protected String getUriAuthority() {
        return "RoomsWithinCategoryContentProvider";
    }

    @Override
    protected String getUriBasePath() {
        return "roomsWithinCategory";
    }

    @Override
    protected String getSQLSelectWhereClause(UriMatcher uriMatcher, Uri uri, String selection, String[] selectionArgs) {
        return super.getSQLSelectWhereClause(uriMatcher, uri, selection, selectionArgs);
    }
}
